Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

357
Views
angular 12, sass, not recognizing "@use '~@angular/material' as mat;" and then "mat.define-typography-config"

I am updating to Angular 12 from Angular 11. During ng serve, I am unable to compile this: https://material.angular.io/guide/typography#define-a-level

Backtrace

./src/custom-theme.scss - Error: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Invalid CSS after "...typography: mat": expected expression (e.g. 1px, bold), was ".define-typography-"
        on line 5 of src/custom-theme.scss
>> $custom-typography: mat.define-typography-config(

   -----------------------^

custom-theme.scss

@use '~@angular/material' as mat;

$custom-typography: mat.define-typography-config(
  $font-family: 'Lato, Helvetica'
);
@include mat.core($custom-typography);
...

My package.json has "node-sass": "^4.14.1",

Any ideas?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!